from selenium.webdriver.common.by import By
from po.Base.Base import Base
import time
class Page3(Base):
    # 点击商品
    sp=(By.XPATH,'/html/body/div[5]/div[2]/div[2]/div[1]/ul/li[1]/div[1]/span/a/img')
    def sp_loc(self):
        self.click(self.sp)
    # 点击兑换
    dh=(By.CSS_SELECTOR,'.shop-btn')
    def dh_loc(self):
        self.click(self.dh)
    # 确认订单
    qveren=(By.XPATH,'//*[@id="order-button"]')
    def qveren_loc(self):
        self.click(self.qveren)
    dy1=(By.XPATH,'/html/body/div[4]/div[3]/span')
    def dy1_loc(self):
        return self.text(self.dy1)



    def a3mall_jifen(self):
        self.sp_loc()
        time.sleep(2)
        self.dh_loc()
        time.sleep(2)
        self.qveren_loc()
        time.sleep(2)
        assert '您的订单支付成功' ==self.dy1_loc()


